import {
  Format
}
from "../../utils/common";
const format = new Format()
Page({
  data: {
    tagData: [
      // { date: '2019-04-14', tag: '还房贷', tagColor: 5 },
      // { date: '2019-04-28', tag: '公积金', tagColor: 2 },
    ],
    calendarUrl: '',
  },
   onLoad: function (options) {
    console.log(options)
    if (options && options.activeTab) {
      this.data.activeTab = options.activeTab
    }
  },
  handleSelect([startDate, endDate]) {
     const startTime = format.date("yyyy-MM-dd", startDate)
     const endTime = format.date("yyyy-MM-dd", endDate)
     console.log(startTime,endTime)
     setTimeout(() => {
      wx.redirectTo({
        url: '/pages/myOrder/myOrder?startTime=' + startTime + '&endTime=' + endTime + '&activeTab=' + this.data.activeTab
      })
     }, 500);
  },
  onMonthChange() {},
});